import request from '../axios'

export default {
  //生成订单
  createOrders(orderId) {
      return request({
        url: '/order/pay/createOrder/'+orderId,
        method: 'post'
      })
  },
  //根据订单id查询订单信息
  getOrdersInfo(id) {
    return request({
      url: '/order/pay/getOrderInfo/'+id,
      method: 'get'
    })
  },
  //生成二维码的方法
  createNatvie(orderNo) {
    return request({
      url: '/order/pay/createNative/'+orderNo,
      method: 'get'
    })
  },
  queryPayStatus(orderNo){
    return request({
      url:'/order/pay/queryPayStatus/'+orderNo,
      method: 'get'
    })
  },
  isBuyCourse(videoId,memberId){
    return request({
      url:`/order/pay/isBuyCourse/${videoId}/${memberId}`,
      method: 'get'
    })
  }

}
